#ifndef _COMMON_INCLUDED_
#define _COMMON_INCLUDED_

#define ARRAY_SIZE(n) sizeof(n)/sizeof(n[0])

inline bool inbounds(int value, int min, int max)
{
	if( value >= max )
		return false;

	if (value < min)
		return false;

	return true;
}

inline void log(char* str, ...)
{
	va_list l;
	va_start(l, str);
	vfprintf(stderr, str, l);
}

#endif //_COMMON_INCLUDED_
